package temp.lho.lws.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import temp.lho.lws.mapper.IBaseMapper;
import temp.lho.lws.mapper.VerifyLossInfoMapper;
import temp.lho.lws.pojo.VerifyLossInfo;
import temp.lho.lws.service.IVerifyLossInfoService;

import java.util.List;

/**
 * (VerifyLossInfo)表服务实现类
 *
 * @author makejava
 * @since 2020-07-06 23:15:37
 */
@Service("verifyLossInfoService")
public class VerifyLossInfoServiceImpl extends BaseServiceImpl<VerifyLossInfo> implements IVerifyLossInfoService {

    @Autowired
    private VerifyLossInfoMapper verifyLossInfoMapper;

    @Override
    protected IBaseMapper<VerifyLossInfo> baseMapper() {
        return verifyLossInfoMapper;
    }

    @Override
    public VerifyLossInfo findByClaimMainId(Integer claimmainid) {
        return verifyLossInfoMapper.findByClaimMainId(claimmainid);
    }

    @Override
    public int add(VerifyLossInfo verifyLossInfo) {
        verifyLossInfoMapper.delete(verifyLossInfo.getClaimmainid());
        return verifyLossInfoMapper.add(verifyLossInfo);
    }
}